<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%String path = request.getContextPath() ;%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN" >
<head>
    <c:set var="ctx" value="${pageContext.request.contextPath}" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>额度变更</title>
    <jsp:include page="../../import.jsp" flush="true" />
</head>
<body class="iframeBody">
<div class="Wrapper">
    <div id="pageInTab" class="pageInTab">
        <div tabid="tabA" title="基本信息" lselected="true">
            <form id="formSet1">
            	<div class="fieldset1 tabel_col clearFix">
					<div class="caption">
                        <span class="title">基本信息</span>
                    </div>
					<div class="fieldBox col_100">
						<div class="label">变更类型</div>
						<div class="field">
							<select  name="changeType" id="changeType" data-value=" "  validate="{required:true}" >
								<option value="" checked >请选择</option>
								<option value="2" >追加</option>
								<option value="3" >扣除</option>

							</select>
						</div>
					</div>
					<div class="fieldBox col_100">
						<div class="label">额度(万)</div>
						<div class="field">
							<input name="changeAmount" id="changeAmount" type="text" class="ui-textbox" value="">
						</div>
					</div>
					<div class="fieldBox col_100">
						<div class="label">备注</div>
						<div class="field">
							 <textarea name="remark" id="remark" rows="4" class="ui-textarea l-textarea" maxlength="500" style="width:300px"
									   value="" validate="{required:true,maxlength:10}" onkeydown="checklength(this);"></textarea>
						</div>
					</div>
				</div>
	            <div class="btnsBox">
	                <span id="saveBtn1" class="sq-button sq-button-round">保存</span>
                    <input name="id" id="id" type="hidden" value="${id }"/>
	            </div>
            </form>
        </div>
    </div>
</div>


<script type="text/javascript">

    $(function(){
        $("#saveBtn1").click(function(event) {

            var data ={};
            var url='<%=path%>/quato/quatoBscInfo/modifyQuato.do';
            console.log( $('#id').val());
            console.log( $('#changeType').val());
            console.log( $('#changeAmount').val());
			data["id"] = $('#id').val();//额度id
			data["changeType"] = $('#changeType').val();//变更类型
			data["changeAmount"] = $('#changeAmount').val();//变更金额
			data["remark"] = $('#remark').val();//备注

            var wait_dialog;
            $.ajax({
                type: 'post',
                dataType:'json',
                data:data,
                url: url,
                beforeSend: function(){
                    wait_dialog=$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING ,SQ_type: "waitting" });
                },
                success:function(msg){
                    wait_dialog.close();
                    if(msg.success == 1){
                        $.ligerDialog.SQalert({content:msg.info, SQ_type: "success"});
						frameElement.dialog.close();
                    }else{
                        $.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
                    }
                }
            })
        })
    })
</script>



</body>
</html>
